package com.qfedu.meidijiaju.service.impl;

import com.qfedu.meidijiaju.service.UserService;
import com.qfedu.meidijiaju.mapper.UserMapper;
import com.qfedu.meidijiaju.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User queryUserInfo(String name) {
        return userMapper.queryUserInfo(name);
    }

    @Override
    public User login(User user) {
        return userMapper.login(user);
    }

    @Override
    public boolean updateUserInfo(User user) {
        return userMapper.updateUserInfo(user);
    }

    @Override
    public boolean deleteUser(int id) {
        return userMapper.deleteUser(id);
    }

    @Override
    public boolean register(User user) {
        return userMapper.register(user);
    }

    @Override
    public User queryUserInfoByPhone(String phone) {
        return userMapper.queryUserInfoByPhone(phone);
    }

    @Override
    public List<User> queryAllUser() {
        return userMapper.queryAllUser();
    }
}
